package com.jiehoo.elove.robot;



import java.io.File;
import java.io.FileFilter;

public class FileNameFilter implements FileFilter {
  String pattern;

  public FileNameFilter(String pattern) {
    this.pattern = pattern;
  }

  public boolean accept(File file) {
    return file.isFile() && file.getName().toLowerCase().matches(pattern);
  }
}